 package org.hoyi.util;
 
 /**
  *          Author:ellen
  *          Email:ellen@kuaifish.com
  *          CreateDate:2015-05-20
  *          ModifyDate:2015-06-20
  *          hoyi entities @ hoyi.org
  *          使用请在项目关于内标注hoyi版权，
  *          hoyi版权归hoyi.org所有
  */
 public class CutStrInfo
 {
   public int startIndex = -1;
   public int endIndex = -1;
 
   public boolean contain = false;
 
   public String startSTR = "";
 
   public String endSTR = "";
 
   public String Template = "";
 
   public String EXPREDContent = "";
 
   public int getStartIndex() {
     return this.startIndex;
   }
 
   public void setStartIndex(int startIndex) {
     this.startIndex = startIndex;
   }
 
   public int getEndIndex() {
     return this.endIndex;
   }
 
   public void setEndIndex(int endIndex) {
     this.endIndex = endIndex;
   }
 
   public boolean isContain() {
     return this.contain;
   }
 
   public void setContain(boolean contain) {
     this.contain = contain;
   }
 
   public String getStartSTR() {
     return this.startSTR;
   }
 
   public void setStartSTR(String startSTR) {
     this.startSTR = startSTR;
   }
 
   public String getEndSTR() {
     return this.endSTR;
   }
 
   public void setEndSTR(String endSTR) {
     this.endSTR = endSTR;
   }
 
   public String getTemplate() {
     return this.Template;
   }
 
   public void setTemplate(String template) {
     this.Template = template;
   }
 
   public String getEXPREDContent() {
     return this.EXPREDContent;
   }
 
   public void setEXPREDContent(String eXPREDContent) {
     this.EXPREDContent = eXPREDContent;
   }
 
   public CutStrInfo()
   {
   }
 
   public CutStrInfo(String _startSTR, String _endSTR)
   {
     setStartSTR(_startSTR);
     setEndSTR(_endSTR);
   }
 
   public CutStrInfo(String _startSTR, String _endSTR, String _template)
   {
     setStartSTR(_startSTR);
     setEndSTR(_endSTR);
     setTemplate(_template);
   }
 
   public boolean Calc(String _template, boolean ContainCONTENT)
   {
     return CalcTemp(_template, getStartSTR(), getEndSTR(), ContainCONTENT);
   }
 
   public boolean Calc(String _template)
   {
     return CalcTemp(_template, getStartSTR(), getEndSTR(), true);
   }
 
   public boolean Calc()
   {
     return Calc(true);
   }
 
   public boolean Calc(boolean ContainCONTENT)
   {
     return CalcTemp(getTemplate(), getStartSTR(), getEndSTR(), ContainCONTENT);
   }
 
   public boolean CalcTemp(String _template, String _startSTR, String _endSTR, boolean ContainCONTENT)
   {
     setTemplate(_template);
     setStartSTR(_startSTR);
     setEndSTR(_endSTR);
 
     if (ContainCONTENT) {
       this.startIndex = _template.toLowerCase().indexOf(_startSTR.toLowerCase());
       this.endIndex = _template.toLowerCase().indexOf(_endSTR.toLowerCase(), this.startIndex);
 
       setStartIndex(this.startIndex);
       setEndIndex(this.endIndex);
       if ((this.startIndex >= 0) && (this.endIndex > 0))
         setEXPREDContent(_template.substring(this.startIndex, this.endIndex + _endSTR.length()));
     }
     else {
       this.startIndex = _template.toLowerCase().indexOf(_startSTR.toLowerCase());
       this.endIndex = _template.toLowerCase().indexOf(_endSTR.toLowerCase(), this.startIndex);
 
       setStartIndex(this.startIndex + _startSTR.length());
       setEndIndex(this.endIndex);
       if ((this.startIndex >= 0) && (this.endIndex > 0)) {
         setEXPREDContent(_template.substring(this.startIndex, this.endIndex));
       }
     }
 
     return (this.startIndex >= 0) && (this.endIndex > 0);
   }
 }
